package org.lds.scheduled.job.admin.business.job.controller;


import lombok.RequiredArgsConstructor;
import org.lds.scheduled.job.admin.business.job.service.JobService;
import org.lds.scheduled.job.admin.client.core.model.request.RegisterJobRequest;
import org.lds.scheduled.job.admin.client.core.model.response.RegisterJobResponse;
import org.lds.scheduled.job.common.model.dto.ResultDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/remote/job")
public class JobRemoteController {
    private final JobService jobService;

    @PostMapping("/register")
    public ResultDTO<RegisterJobResponse> registerJob(@RequestBody RegisterJobRequest request) {
        return jobService.registerJob(request);
    }

}